/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: ling
 * Date: 2022-08-29
 * Time: 22:48
 */
public class Test4 {
    public static void main(String[] args) {
        Thread t3=new Thread(()->{
            System.out.println(Thread.currentThread().getName());
        },"c");
        Thread t2=new Thread(()->{
            try {
                t3.join();
                System.out.println(Thread.currentThread().getName());
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        },"b");
        Thread t1=new Thread(()->{
            try {
                t2.join();
                System.out.println(Thread.currentThread().getName());
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        },"a");


        t1.start();
        t2.start();
        t3.start();
    }
}
